home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1906 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: informatik.tu-muenchen.de!not-for-mail
  2. From: wist@lam.mw.tu-muenchen.de (Henrik Wist)
  3. Newsgroups: comp.unix.osf.osf1,comp.lang.c
  4. Subject: printf-problem
  5. Date: 17 Jan 1996 15:27:02 GMT
  6. Organization: Technische Universitaet Muenchen, Germany    
  7. Distribution: world
  8. Message-ID: <4dj4g6$t9f@sunsystem5.informatik.tu-muenchen.de>
  9. Reply-To: wist@lam.mw.tu-muenchen.de
  10. NNTP-Posting-Host: onyx2.lam.mw.tu-muenchen.de
  11. X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
  12.  
  13. Hi Folks!
  14. Got a little problem with printing large int's from a c-program.
  15. Platform: Digital Alpha running DG-UX3.2
  16.  
  17. Problem:
  18. .
  19. .
  20. .
  21.  
  22. long int zahl;   /* which is e.g. 10000500001 */
  23. printf("%d\n",zahl);      /* gives 1410565409, which is definitly wrong */
  24. .
  25. .
  26. .
  27.  
  28. Is that a problem of printf() or DG-UX or is it my problem that I don't know
  29. the right conversion for printf(). Btw, printf("%u",zahl) didn't work either.
  30. Any suggestions?
  31. Thanks alot,
  32. Henrik
  33. ---------------------------------------------------------------------
  34. "Woher soll ich wissen, was ich denke, bevor    |Tel.:+49/89/3089598
  35. ich nicht gehoert habe, was ich sage?"          |smail: Destouchesstr.71
  36. IRC: |GOOSE|                                    |       80796 Munich
  37. Systemadministrator am Lehrstuhl A fuer Mechanik|       Germany
  38. ---------------------------------------------------------------------
  39. >>>http://www.lam.mw.tu-muenchen.de/mitarb/wist.html<<<
  40.  
  41.